var app = getApp();
var util = require('../../../../utils/util.js');

Page({
    data: {
        title:"",
        content:""
    },
    onLoad: function (e) {
        var that = this;
        that.setData({
            navH: app.globalData.navHeight,
            marH: app.globalData.navHeight+20,
            detId:e.id
        })
        that.getHelpDet();
    },
    navBack: function () {
        wx.navigateBack({
            delta: 1
        })
    },
    getHelpDet: function () {
        var that = this;
        wx.request({
            url: app.globalData.apiHost + "/api/faq/details",
            data: {
                id: that.data.detId
            },
            header: {
                'content-type': 'application/x-www-form-urlencoded',
            },
            method: "POST",
            dataType: "json",
            success: function (res) {
                if (res.statusCode === 200) {
                    var contentCode = util.baseDecode(res.data.data.content);
                    that.setData({
                        title:res.data.data.title,
                        content:contentCode
                    })
                }
            },
            
        });
    },
})

